package com.whw.fy.mapper;

import com.whw.fy.entity.Staff;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface StaffMapper {
    int deleteByPrimaryKey(Integer staffId);

    int insert(Staff record);

    int insertSelective(Staff record);

    Staff selectByPrimaryKey(Integer staffId);

    int updateByPrimaryKeySelective(Staff record);

    int updateByPrimaryKey(Staff record);

    int updateBatch(List<Staff> list);

    int updateBatchSelective(List<Staff> list);

    int batchInsert(@Param("list") List<Staff> list);

    Staff selectByStaffIdAndStaffPwd(@Param("staffId") Integer staffId, @Param("staffPwd") String staffPwd);

    Staff selectByStaffOpenid(@Param("staffOpenid") String staffOpenid);

    int updateStaffOpenidByStaffId(@Param("updatedStaffOpenid") String updatedStaffOpenid, @Param("staffId") Integer staffId);

    List<Staff> selectAll();

    List<Staff> selectAllByStaffJurisdiction(@Param("staffJurisdiction") Integer staffJurisdiction);

    //统计权限是6，7，8的员工
    List<Staff> countAllStaffWithJurisdictionInSixAndSevenAndEight();

    //统计权限是0，2的员工
    List<Staff> countAllStaffWithJurisdictionInZeroAndTwo();

    //统计权限是7，8的员工
    List<Staff> countAllStaffWithJurisdictionInSevenAndEight();

    //统计权限是5，6的员工
    List<Staff> countAllStaffWithJurisdictionInSixAndFive();
}